<%-- 
    Document   : clasifyResults
    Created on : Mar 3, 2012, 12:39:50 AM
    Author     : xjuraj
--%>

<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<s:layout-render name="/WEB-INF/pages/layout.jsp">
    <s:layout-component name="head">

    </s:layout-component>
    <s:layout-component name="title">
        <f:message key="page.batch.results.title"/>
    </s:layout-component>
    <s:layout-component name="afterTitle">

    </s:layout-component>
    <s:layout-component name="content">
        <s:useActionBean 
            beanclass="sk.lieskove.jianghongtiao.paris.webclient.web.ClassificationActionBean"
            var="classify"/>
        <div class="post">
            <h2 class="title"><c:out value="${page.batch.results.title}" /></h2>
            <div class="entry">
                <c:forEach var="mapItem" items="${results}">
                    <h3><c:out value="${mapItem.key.name}"/></h3>
                    (Language: <c:out value="${mapItem.key.language}"/>; 
                    Baseline: <c:out value="${mapItem.key.baseline}"/>)
                    <div>
                        <table border="0">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <!--<th>Train Set</th>
                                    <th>Test Set</th>-->
                                    <th>Accuracy</th>
                                    <th>Correctly</th>
                                    <th>Incorrectly</th>
                                    <th>WA Precision</th>
                                    <th>WA Recall</th>
                                    <th>WA F-measure</th>
                                    <!--<th>Tree</th>
                                    <th>Confusion matrix</th>-->
                                </tr>
                            </thead>
                            <tbody>
                                <c:forEach items="${mapItem.value}" var="eval">
                                    <tr>
                                        <td><f:formatNumber value="${eval.position}"/>.</td>
                                        <!--<td>
                                            <a href="#" rel="htmltooltip">Classes</a>
                                            <div class="htmltooltip"><c:out value="${eval.trainSetClassesAsString}"/></div>
                                        </td>
                                        <td>
                                            <a href="#" rel="htmltooltip">Classes</a>
                                            <div class="htmltooltip"><c:out value="${eval.testSetClassesAsString}"/></div>
                                        </td>-->
                                        <td><f:formatNumber maxFractionDigits="2" value="${eval.accuracy}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${eval.correctly}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${eval.incorrectly}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${eval.waPrecision}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${eval.waRecall}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${eval.waFmeasure}"/></td>
                                        <!--<td>
                                            <a href="#" rel="htmltooltip">Tree</a>
                                            <div class="htmltooltip"><c:out value="${eval.tree}"/></div>
                                        </td>
                                        <td>
                                            <a href="#" rel="htmltooltip">Confusion matrix</a>
                                            <div class="htmltooltip"><c:out value="${eval.confusionMatrix}"/></div>
                                        </td>-->
                                    </tr>
                                </c:forEach>
                                    <tr>
                                        <td>Mean</td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${mapItem.key.meanAccuracy}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${mapItem.key.meanCorrectly}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${mapItem.key.meanIncorrectly}"/></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>Std. Dev.</td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${mapItem.key.stdandardDeviationAccuracy}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${mapItem.key.stdandardDeviationCorrectly}"/></td>
                                        <td><f:formatNumber maxFractionDigits="2" value="${mapItem.key.stdandardDeviationIncorrectly}"/></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                            </tbody>
                        </table>
                    </div>
                    <hr/>
                </c:forEach>
            </div>
        </div>
    </s:layout-component>
    <s:layout-component name="sidebar">

    </s:layout-component>
</s:layout-render>